<template>

	<view class="title-s1">
		<text class="title" :style="{'color': value.color}">{{ value.name }}</text>
		<view class="right-more" @click="redirectTo(value.link)">
			<text>更多</text>
			<u-icon name="arrow-right" :bold="true" :color="value.color"></u-icon>
		</view>
	</view>

</template>

<script>
	// 标题
	export default {
		name: 'lrw-m_goods_title_s1',
		props: {
			value: {
				type: Object,
				default: () => {
					return {
						padding: 0,
						bg_color: '#fff',
						bg_img: ''
					};
				}
			}
		},
		data() {
			return {
				background: '',
				textAlign: 'center'
			};
		},
		created() {
			// this.value.padding *= 2; //转行比率
			// this.background = `url('${this.value.bg_img}') 50% / 100% no-repeat ${this.value.bg_color}`;
			// if (this.value['text_align'] == 1) {
			// 	this.textAlign = 'left';
			// } else if (this.value['text_align'] == 2) {
			// 	this.textAlign = 'center';
			// } else {
			// 	this.textAlign = 'right';
			// }
		},
		methods: {
			redirectTo(link) {
				this.$emit('redirectTo', link);
			}
		}
	};
</script>

<style lang="scss" scoped>
	.title-s1 {
		padding: 10px;
		font-size: 16px;
		font-weight: bold;
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		border-bottom: 1px solid #eee;

		.title {
			color: #000;
		}

		.right-more {
			display: flex;
			flex-direction: row;
		}

	}
</style>
